/**
 * 对原生String的扩展
 * @Author Canaan
 * @Date 2018/11/1.
 */
String.prototype.endWith = function (s) {
    if (s === null || s === undefined || s === "" || this.length === 0 || s.length > this.length)
        return false;
    return this.substring(this.length - s.length) === s;
};

String.prototype.startWith = function (s) {
    if (s === null || s === undefined || s === "" || this.length === 0 || s.length > this.length)
        return false;
    return this.substr(0, s.length) === s;
};

// if(Cts.indexOf("Text") >= 0 )
// {
//     alert('Cts中包含Text字符串');
// }
